<template>
	<view class="page">
		<view class="body">
			<uni-section title="服务商昵称" type="line">
				<input type="text" placeholder="请输入服务商昵称" class="input_css" v-model="name" />
			</uni-section>
			<uni-section title="手机号" type="line">
				<input type="text" placeholder="请输入手机号" class="input_css" v-model="name" />
			</uni-section>
			<uni-section title="登录密码" type="line">
				<input type="password" placeholder="请输入密码" class="input_css" v-model="password" />
			</uni-section>
			<uni-section title="确认登录密码" type="line">
				<input type="password" placeholder="请输入密码" class="input_css" v-model="password2" />
			</uni-section>
			<uni-section title="支付密码" type="line">
				<input type="password" placeholder="请输入支付密码" class="input_css" v-model="pay_password" />
			</uni-section>
			<uni-section title="确认支付密码" type="line">
				<input type="password" placeholder="请输入支付密码" class="input_css" v-model="pay_password2" />
			</uni-section>
			<uni-section title="服务商费率" type="line">
				<input type="text" placeholder="请输入服务商费率" class="input_css" v-model="rates" />
			</uni-section>
		</view>
		<view class="btn_css">
			<view class="btn" @click="btn">
				提交
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: '',
				phone: '',
				password: '',
				password2: '',
				rates: '',
				pay_password: '',
				pay_password2: ''
			}
		},
		onLoad(e) {
			if (e.type == "edit") {
				uni.setNavigationBarTitle({
					title: '编辑服务商'
				})
			}
		},
		methods: {
			// 新增商家
			btn() {
				const data = {
					name: this.name,
					phone: this.phone,
					password: this.password,
					password2: this.password2,
					rates: this.rates,
					invite: this.invite,
					type: this.type
				}
				console.log("新增商家", data);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		height: 100%;

		.body {
			.input_css {
				background-color: #f5f6f9;
				padding: 30rpx;
				border-radius: 15rpx;
			}
		}

		.btn_css {
			padding-top: 50px;
		}
	}
</style>